
<div class="manage-departemen">
<div class="manage-departemen-atas">List Departemen</div>
<div class="manage-departemen-tengah"><a href="<?php echo site_url('master/dept/create_dept');?>"><img src="<?php echo base_url();?>images/departemen.png" width="100" border="none" /></a>
<div  class="manage-departemen-tengah-box">
<?php
if(isset($_SESSION['sys_admin']) and isset($_SESSION['name'])) {

	echo ! empty($message) ? '<p class="message">' . $message . '</p>': '';
	echo ! empty($success) ? '<p class="message">' . $success . '</p>': '';
	
	$flashmessage = $this->session->flashdata('message');
	echo ! empty($flashmessage) ? '<p class="message">' . $flashmessage . '</p>': '';
	
	


/*echo ! empty($table) ? $table : '';*/
?>


<table cellpadding="0" cellspacing="0" border="0" id="table" class="sortable" width="600" >
<thead>
	<tr>
		<th class="nosort"><h3>No</h3></th>
        <th><h3>DEPT NAME</h3></th>
        <th><h3>DESC</h3></th>
        
        <th><h3>ACTIONS</h3></th>
	</tr>
</thead>
<tbody>
	<?php
		$w1 ="#bee1ff";
		$w2 ="#90ccff";
		$warna = $w1;
		$no =0;
		foreach($dept->result() as $cek) {
			if($warna==$w1) {
		$warna = $w2;
		} else {
			$warna = $w1;
			}
		$no ++;
	?>
	<tr bgcolor="<?php echo $warna;?>">
		<td><?php echo $no;?></td>
        <td><a href="<?php echo site_url('master/dept/shdept');?>/<?php echo $cek->dept_id;?>"><?php echo strip_tags($cek->dept_name);?></a></td>
        <td><?php echo strip_tags($cek->descr);?></td>
         
        <td><a href="<?php echo site_url('master/dept/update_dept')."/".$cek->dept_id;?>"><img src="<?php echo base_url();?>images/update.png" border="none"></a> <?php echo anchor('master/dept/delete/'.$cek->dept_id,'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ',array('class'=>'delete','onclick'=>"return confirm('Anda yakin akan menghapus data ini?')"));?></td>
	</tr>
	<?php } ?>
	<?php } ?>
</tbody>
</table></div>
<script type="text/javascript" src="<?php echo base_url();?>js/sorter.js"></script>
<script type="text/javascript">
	var sorter = new TINY.table.sorter("sorter");
		sorter.head="heads";
		sorter.asc = "asc";
		sorter.desc = "desc";
		sorter.even = "evenrow";
		sorter.odd = "oddrow";
		sorter.evensel ="evenselected";
		sorter.oddsel ="oddselected";
		sorter.paginate= true;
		sorter.currentid ="currentpage";
		sorter.limited ="pagelimit";
		sorter.init("table",1);

</script>


</div>
<div class="manage-departemen-bawah"></div>
</div>